﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="Phoenix.Service.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadStyles" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadScripts" runat="server">
<script type="text/javascript" src="/Scripts/m-lhgdialog/m-lhgdialog.js"></script>    
<script type="text/javascript" src="/Scripts/library/m-pagination.js"></script>    
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
<form id="form1" runat="server">
<div class="path">
        <strong>部门管理</strong>
    </div>
    <div class="pd10">
        <div class="mb10 aL">
            <a href="/Organization/Edit" title="添加部门" class="a-btn1" >添加部门</a>
        </div>
          <span id="Grid">
<table class="tb-list hover">
    <tr>
        <th>
            部门ID
        </th>
        <th>
            部门名称
        </th>
        <th>
            部门主管ID
        </th>
        <th >
            部门主管姓名
        </th>
         <th >
            部门号码
        </th>
         <th >
            部门地址
        </th>
         <th  style=" width:20%">
            操作
        </th>
    </tr>
    <%  IList<OrganizationModel> OrganizationList = ViewData["OrganizationList"] as List<OrganizationModel>; %>
    <%foreach (var item in OrganizationList) %> 
    <%{ %>
     <tr>
        <td >
           <%=item.OrgID %>
        </td>
          <td class="aL">
           <%=item.OrgName %>
        </td>         
        <td >
           <%=item.LeaderID %>
        </td>
         <td >
           <%=item.LeaderName %>
        </td>
         <td >
           <%=item.OfficePhone %>
        </td>
         <td >
           <%=item.Address %>
        </td>
        <td style="width:20%">
          <a href="javascript:void(showEdit('<%=item.OrgID %>'))">编辑</a>  <a href="javascript:void(showAdd('<%=item.OrgID %>'))">添加部门</a> <a href="/AdminGroup/Index?orgID=<%=item.OrgID %>">管理职位</a> <a href="javascript:;" onclick="DeleteNews('<%=item.OrgID %>')">删除</a>
        </td>
    </tr>
    <%} %>
</table>
        </span>
    </div>
    </form>
</asp:Content>



<asp:Content ID="Content5" ContentPlaceHolderID="BodyScripts" runat="server"> 
 <script type="text/javascript">
     function showEdit(orgID) {
         OpenPop('/Organization/edit?action=2&orgID=' + orgID, "编辑商品类目", 600, 350);
     };

     function showAdd(orgID) {
         OpenPop('/Organization/edit?action=1&orgID=' + orgID, "添加部门", 600, 350);
     };

     //打开弹窗
     function OpenPop(url, titleName, width, height) {
         width = width || 800;
         height = height || 500;
         window.top.winObj = window;
         window.top.oDG = new $.dialog({ id: 'esDialog', title: titleName, page: url, width: width, height: height, btnBar: false, lockScroll: true });
         window.top.oDG.ShowDialog();
     }
</script>
</asp:Content>
